﻿<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<head>
<title>Gapi</title>
<link href="../resources/css/jsonformat.css" type="text/css" rel="stylesheet"></link>
<link rel="stylesheet" type="text/css" href="../resources/css/gapi.css">
<script type="text/javascript" src="../resources/js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="../resources/js/jquery.foggy.js"></script>
<script type="text/javascript" src="../resources/js/common.js"></script>
<script src="../resources/js/jsonformat.js" type="text/javascript"></script>
<script type="text/javascript" src="../resources/js/gapi.js"></script>
</head>
<body>
	<div class="navigation" >
		<input type="button" class="button green"  value="首页" id="home" onclick="window.location.href='../'" /> 
		<input type="button" class="button blue"  value="数据初始化"  id="datainit" />
		<input type="button" class="button blue"  value="全部收起"  id="ocpul" />
		<input type="button" class="button blue"   value="API 说明"  id="api" />
		<hr>
		<ul id="pul"></ul>
	</div>
	<div style="float: left; width: 75%; margin-left: 2%;">
		<div class="HeadersRow">
			<b>input : </b>
			<textarea id="inputjson"></textarea>
			<textarea id="RawJson" style="display: none"></textarea>
		</div>
		<div id="ControlsRow">
			<b>output : </b> <input type="button" class="button red" value="Go" id="go"
				onclick="go()" /> <input type="Button" class="button blue"  value="Format"
				onclick="format()" /> <label for="QuoteKeys"> <input
				type="checkbox" id="QuoteKeys" onclick="QuoteKeysClicked()"
				checked=true/> 引号
			</label>&nbsp; <a href="javascript:void(0);" onclick="SelectAllClicked()">全选</a>&nbsp;|&nbsp;

			<b id="requrl">请求路径:</b>

			<div style="display: none">
				<span id="TabSizeHolder"> 缩进量 <select id="TabSize"
					onchange="TabSizeChanged()">
						<option value="1">1</option>
						<option value="2" selected="true">2</option>
						<option value="3">3</option>
						<option value="4">4</option>
						<option value="5">5</option>
						<option value="6">6</option>
				</select>
				</span> <span id="CollapsibleViewHolder"> <label
					for="CollapsibleView" style="display: none;"> <input
						type="checkbox" id="CollapsibleView"
						onclick="CollapsibleViewClicked()" checked="true" /> 显示控制
				</label>
				</span> <span id="CollapsibleViewDetail"> <a
					href="javascript:void(0);" onclick="ExpandAllClicked()">展开</a> <a
					href="javascript:void(0);" onclick="CollapseAllClicked()">叠起</a> <a
					href="javascript:void(0);" onclick="CollapseLevel(3)">2级</a> <a
					href="javascript:void(0);" onclick="CollapseLevel(4)">3级</a> <a
					href="javascript:void(0);" onclick="CollapseLevel(5)">4级</a> <a
					href="javascript:void(0);" onclick="CollapseLevel(6)">5级</a> <a
					href="javascript:void(0);" onclick="CollapseLevel(7)">6级</a> <a
					href="javascript:void(0);" onclick="CollapseLevel(8)">7级</a> <a
					href="javascript:void(0);" onclick="CollapseLevel(9)">8级</a>
				</span>
			</div>
		</div>
		<div id="Canvas" class="Canvas"></div>
	</div>
	<!-- api desc begin-->
	<div class="gapi" id="gapi" >
	<a href="javascript:void(0);" onclick="$('.gapi').fadeOut(200)">&nbsp;&nbsp;&nbsp;╳&nbsp;&nbsp;&nbsp;</a>
			<br>
			接口说明：<br/>
			1. input 是点击左边导航相应功能接口的输入参数<br/>
			2. output 是根据input中输入参数请求接口后的输出参数<br/>
			3. 点击Go是将手动改动后的input参数重新请求接口<br/>
			4. 点击Format是将input里的参数进行格式化<br/>
			5. 请求路径是经过mvc处理的restful路径，需要把页面放到项目的pages下；例如：<br/>
			&nbsp;&nbsp;<b>(1)请求路径是user/register，就会访问到 pages/user/register.html</b><br/>
			&nbsp;&nbsp;<b>(2)请求路径是user/register/save，这是保存数据的路径，不会返回页面，会返回flag和msg</b><br/>
			&nbsp;&nbsp;<b>(3)如果是分离项目独立开发，请求路径加上IP端口就行了：http://127.0.0.1:8080/user/register</b><br/>
			6. 数据初始化是将数据初始化原来的测试数据，<x>一旦初始化不可以回退，慎重！</x>
			<br/>
			<br/>
			备注:<br> 
			所有的输入输出参数都是json类型<br/>
			所有请求都是post请求<br>
			字段说明：<br>
			flat=0 失败<br>
			flat=1 成功<br>
			msg：返回失败的消息，一般这个字段没有值，只有特定的失败这个字段才有值，比如{msg:用户名已存在}
	</div>
	<!-- api desc end -->
</body>
</html>

